<?php
// +----------------------------------------------------------------------
// | flow-notify / uniapp.php    [ 2021/11/9 3:31 下午 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2021 zhangqiquan All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangqiquan <768617998@qq.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
use notify\Notify;
spl_autoload_register(function ($class) {
    $class = dirname(__DIR__, 1) .'/'. str_replace('\\', '/', $class) . '.php';
    $class = str_replace('/notify/', '/src/', $class);
    if (file_exists($class)) {
        require_once ($class);
    }else{
        //print_r(debug_backtrace());
        echo $class.'文件不存在'.PHP_EOL;die;
    }

});

$data = Notify::unipush([
    'app_id' => 'aaaaa',
    'app_key' => 'bbbb',
    'app_secret' => 'ccccc',
    'master_secret' => 'dddd',
])->pushAddSingle('4a9f21722b96c3a571591a53926fdf09', '111', '222', [
    'openpage' => 'pages/detailsPlay/detailsPlay?id=152',
    'opentype' => 1
])->pushBatchSingleSend();


print_r($data);die;